$(function(){
	$(".other-channel").pin({
		containerSelector:'.channel',
		minWidth:940
	});
	
	$(".item-list").pin({
		containerSelector:'.main',
		minWidth:940
	});
	
	initChannelActive();
	initActive();
});
function initChannelActive(){
	var otherChannels = $(".other-channel dd");
	var channel_id = $("#channel_current_id").val();
	if(otherChannels!=undefined){
		$.each(otherChannels,function(index,element){
			var id = $(element).attr("data-id");
			if(id==channel_id){
				$(element).addClass("active");
			}
		});
	}
}
function initActive(){
	var itemList = $(".item-list dd");
	var current_id = $("#current_id").val();
	if(itemList!=undefined){
		$.each(itemList,function(index,element){
			var id = $(element).attr("data-id");
			if(id==current_id){
				$(element).addClass("active");
			}
		});
	}
}
